import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import '../node_modules/element-plus/theme-chalk/index.css'
import './assets/main.css'
import axios from 'axios'
import mitt from 'mitt'
import VueCookies from "vue-cookies";


import * as ELIcons from '@element-plus/icons-vue'

const app = createApp(App)

for (let iconName in ELIcons) {
    app.component(iconName, ELIcons[iconName])
}

// var axios = require('axios')
axios.defaults.baseURL = 'http://101.33.228.125:8777/api'
axios.defaults.withCredentials = true;
// app.config.productionTip = false
app.config.globalProperties.$axios = axios
app.config.globalProperties.$bus = new mitt()
app.use(router)
app.use(VueCookies)

app.use(ElementPlus)

app.mount('#app')
